Skip to content

Latest commit

 

History

History
62 lines (52 loc) · 1.67 KB

File metadata and controls

62 lines (52 loc) · 1.67 KB
id title description sidebar_label
storage-logs
Logs
Learn how to check Storage Logs
Debugging

Accessing the Storage Logs allows you to examine all incoming request logs to your Storage service. You can also filter logs and delve into specific aspects of your requests.

Common log queries

Filter by status 5XX error

select id, storage_logs.timestamp, event_message, r.statusCode, e.message as errorMessage e.raw as rawError
  from storage_logs
  cross join unnest(metadata) as m
  cross join unnest(m.res) as r
  cross join unnest(m.error) as e
  where r.statusCode >= 500
  order by timestamp desc
  limit 100

Filter by status 4XX error

select id, storage_logs.timestamp, event_message, r.statusCode, e.message as errorMessage e.raw as rawError
  from storage_logs
  cross join unnest(metadata) as m
  cross join unnest(m.res) as r
  cross join unnest(m.error) as e
  where r.statusCode >= 400 and r.statusCode < 500
  order by timestamp desc
  limit 100

Filter by method

select id, storage_logs.timestamp, event_message, r.method
from
  storage_logs
  cross join unnest(metadata) as m
  cross join unnest(m.req) as r
where r.method in ("POST")
order by timestamp desc
limit 100;

Filter by IP address

select id, storage_logs.timestamp, event_message, r.remoteAddress
from
  storage_logs
  cross join unnest(metadata) as m
  cross join unnest(m.req) as r
where r.remoteAddress in ("IP_ADDRESS")
order by timestamp desc
limit 100;